<?php $this->_extends('_layouts/default_layout'); ?>

<?php $this->_block('title'); ?>证券排行, <?php $this->_endblock(); ?>


<?php $this->_block('helper'); ?>
	<div class="box"  style="margin-top: 20px;">
		<div class="box-title">
			相关证券
		</div>
		<div class="box-content">
			<?php if(isset($rs)): foreach($rs as $r): ?>
				<a  class="box-entity" href="<?=url("sec/p", "id/{$r['id']}") ?>"><?=$r['name'] ?></a><br />
			<?php endforeach; endif;?>
		</div>
	</div>
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>
<div class="text-body">
	<?php if(isset($p)): ?>
		<h3 style="margin: 20px 0px 10px 10px; float: left;"><?=$p['press_time'] ?></h3>
		<div class="press-suite ui-corner-all">
			<div class="press-subject ui-corner-all">
			<?php if (empty($p['title'])):?>
					<span style="font-size:125%; font-weight: bold">小新闻：</span>
			<?php else:?>
			        <span style="font-size:125%; font-weight: bold; font-family: 微软雅黑"><?=h($p['title'])?></span>
			<?php endif;?>
					<?=nl2p(h($p['press'])) ?>
					
			</div>
		
		
			<div class="description" style="text-align:right; margin-top: 10px;">
				报道者: <a href="<?php $u=h($p['username']); echo url("people/{$u}"); ?>" ><?=$p['nickname'] ?></a>@<?=$p['view_time']?>
				<?php if($p['tags']): ?> | 标签: <?=h($p['tags']) ?><?php endif;?>
				<?php if(isset($p['link']) && !empty($p['link'])): ?>
				<?php if($p['link']): ?> | <a href="<?=h($p['link']) ?>" ><?php if($p['src']): ?><?=h($p['src']) ?>» <?php else:?>参考»<?php endif;?></a><?php endif;?>
				<?php endif;?>
			</div>
		<?php if (!empty($p['view'])): ?>
			<div class="press-view ui-corner-all">
				<span style="font-size:125%;font-weight: bold">观点：</span><?=nl2p(h($p['view'])) ?>
			</div>
		<?php endif;?>
		</div>
		<br />
		<?php if(isset($comments)): foreach($comments as $c): ?>
			<div class="comment-entity">
			    <div class="comment-title"><a style="font-weight: bold" href=""><?=h($c['nickname'])?></a> @ <?=$c['comment_time']?>: </div>
			    <p><?=nl2p(h($c['comment'])) ?></p>
			</div>
		<?php endforeach; endif;?>
		<form action="<?=url("press/comment") ?>" method="POST" style="margin: 20px">
		<h3>发表看法：</h3>
		<textarea class="char-limit-240" style="margin: 5px;" cols="84" rows="5" name='comment'></textarea><br />
		<input type="hidden" name="id" value="<?=$p['id'] ?>" />
		<button type="submit">提交</button>
		</form>
	<?php else: ?>
		<div class="press-suite ui-corner-all">没有找到你想要的小新闻，可能已经删除或者根本就不存在</div>
	<?php endif;?>
</div>
<?php $this->_endblock(); ?>
